﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="wxUserAdd.aspx.cs" Inherits="Admin_User_wxUserAdd" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>50CMS后台框架</title>
    <link rel="shortcut icon" href="favicon.ico" />
    <link href="../css/bootstrap.min.css?v=3.3.6" rel="stylesheet" />
    <link href="../css/font-awesome.css?v=4.4.0" rel="stylesheet" />
    <link href="../css/animate.css" rel="stylesheet" />
    <link href="../css/style.css?v=4.1.0" rel="stylesheet" />
    <link href="../css/plugins/iCheck/custom.css" rel="stylesheet" />

    <link href="../50/style.css" rel="stylesheet" />
    <link href="../css/plugins/sweetalert/sweetalert.css" rel="stylesheet" />
    <link href="../Js/clockpicker/bootstrap-clockpicker.min.css" rel="stylesheet" />
    <script src="../Js/plugins/sweetalert/sweetalert.min.js"></script>

    <style type="text/css">
        #where, #lonlat, #lonlat2, #txtAddress {
            width: 300px;
            height: 30px;
            font-size: 24px;
            /*color: blue;*/
        }

        #but {
            width: 100px;
            height: 36px;
            font-size: 20px;
        }

        input[type=checkbox],
        input[type=radio] {
            -webkit-appearance: none;
            appearance: none;
            width: 17px;
            height: 17px;
            margin: 0;
            cursor: pointer;
            vertical-align: middle;
            background: #fff;
            border: 1px solid #0e9aef;
            -webkit-border-radius: 1px;
            -moz-border-radius: 1px;
            border-radius: 1px;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
            position: relative;
        }

            input[type=checkbox]:active,
            input[type=radio]:active {
                border-color: #c6c6c6;
                background: #ebebeb;
            }

            input[type=checkbox]:hover {
                border: 2px solid #0e9aef;
                -webkit-box-shadow: inset 0 2px 2px rgba(0,0,0,0.1);
                -moz-box-shadow: inset 0 2px 2px rgba(0,0,0,0.1);
                box-shadow: inset 0 2px 2px rgba(0,0,0,0.1);
            }

            input[type=checkbox]:checked,
            input[type=radio]:checked {
                background: #fff;
            }

                input[type=checkbox]:checked::after {
                   content: url(http://jjdemo.kmjdcb.com/temple/img/checkmark.png);
                    display: block;
                    position: absolute;
                    top: -5px;
                    right: 0px;
                    left: -5px
                }

            input[type=checkbox]:focus {
                outline: none;
                border: 2px solid #0e9aef;
            }
    </style>
</head>

<body class="gray-bg">
    <form id="form1" runat="server" class="form-horizontal m-t">
        <div class="wrapper animated fadeInRight">
            <div class="row">
                <div class="tabs-container" style="margin-top: 1em;">
                    <ul class="nav nav-tabs">
                        <li class="active" id="tab1"><a data-toggle="tab" href="#tab11" aria-expanded="true">基础信息</a> </li>

                        <%--<li class="" id="tab2"><a data-toggle="tab" href="#tab22" aria-expanded="false">时间管理</a> </li>--%>
                    </ul>

                    <div class="tab-content">
                        <div id="tab11" class="tab-pane active">
                            <div class="ibox-content">
                                <div class="panel-body">
                                    <div class="form-group">

                                        <div class="col-sm-12">
                                            <label class="col-sm-12 cintrol-label">姓名</label>
                                            <div class="col-sm-6">
                                                <asp:TextBox ID="UTrueName" runat="server" type="text" class="form-control" MaxLength="50" HintTitle="姓名" HintInfo="请输入姓名"></asp:TextBox>
                                            </div>
                                        </div>

                                        <div class="col-sm-12" style="margin-top: 1em">
                                            <label class="col-sm-12 cintrol-label">联系方式</label>
                                            <div class="col-sm-6">
                                                <asp:TextBox ID="UTel" runat="server" type="text" class="form-control" MaxLength="50" HintTitle="联系方式" HintInfo="用作登陆账号"></asp:TextBox>
                                            </div>
                                        </div>


                                        <div class="col-sm-12" style="margin-top: 1em">
                                            <label class="col-sm-12 cintrol-label">购买积分(用户购买商品的积分)</label>
                                            <div class="col-sm-6">
                                                <asp:TextBox ID="Ujifen" runat="server" type="text" class="form-control" required="" aria-required="true" HintTitle="积分" HintInfo="积分">0</asp:TextBox>
                                            </div>
                                        </div>

                                        <div class="col-sm-12" style="margin-top: 1em">
                                            <label class="col-sm-12 cintrol-label">积分(对用户的上级进行分享和分红的积分)</label>
                                            <div class="col-sm-6">
                                                <asp:TextBox ID="USharejifen" runat="server" type="text" class="form-control" required="" aria-required="true" HintTitle="积分" HintInfo="积分">0</asp:TextBox>
                                            </div>
                                        </div>

                                        <div class="col-sm-12" style="margin-top: 1em">
                                            <label class="col-sm-12 cintrol-label">预收益积分(计算用户预计收益的积分)</label>
                                            <div class="col-sm-6">
                                                <asp:TextBox ID="UYJjifen" runat="server" type="text" class="form-control" required="" aria-required="true" HintTitle="积分" HintInfo="积分">0</asp:TextBox>
                                            </div>
                                        </div>

                                        <%--<div class="col-sm-12" style="margin-top: 1em">
                                            <label class="col-sm-12 cintrol-label">其他联系方式</label>
                                            <div class="col-sm-6">
                                                <asp:TextBox ID="UTelOther" runat="server" type="text" class="form-control" required="" aria-required="true" MaxLength="50" HintTitle="其他联系方式" HintInfo="例如400"></asp:TextBox>
                                            </div>
                                        </div>--%>

                                        <%--<div class="col-sm-12" style="margin-top: 1em">
                                            <label class="col-sm-12 cintrol-label">登陆密码</label>
                                            <div class="col-sm-6">
                                                <asp:TextBox ID="UPwd" runat="server" type="text" class="form-control" required="" aria-required="true" MaxLength="50" HintTitle="登录密码" HintInfo="请输入登录密码"></asp:TextBox>
                                            </div>
                                        </div>--%>
                                        <div class="col-sm-12" style="margin-top: 1em">
                                            <label class="col-sm-12 cintrol-label ">是否为修理厂老板</label>
                                            <asp:CheckBox ID="CheckBox1" name="checkbox" runat="server" Style="margin: 0 15px;" />

                                        </div>
                                        <div class="col-sm-12" style="margin-top: 1em">
                                            <label class="col-sm-12 cintrol-label">所属商家</label>
                                            <div class="col-sm-6">
                                                <asp:DropDownList ID="ddlEmployee" runat="server" class="form-control">
                                                </asp:DropDownList>
                                            </div>
                                        </div>


                                        <%-- <div class="col-sm-12" style="margin-top: 1em">
                                            <label class="col-sm-12 cintrol-label">状态</label>
                                            <div class="col-sm-6">
                                                <asp:DropDownList ID="UState" runat="server" class="form-control">
                                                    <asp:ListItem Value="0">请选择工程师状态</asp:ListItem>
                                                    <asp:ListItem Value="1" Selected="True">在职</asp:ListItem>
                                                    <asp:ListItem Value="2">离职</asp:ListItem>
                                                </asp:DropDownList>
                                            </div>
                                        </div>--%>


                                        <%--<div class="col-sm-12" style="margin-top: 1em;">
                                           <div style="width:60%;">
                                            <div style="margin: auto; width: 100%; height: 400px; border: 2px solid gray; margin-bottom: 50px;" id="container"></div>
                                            <div style="position: absolute; top: 0; right: 0px; width: 40%; text-align: left;">
                                                <h3 style="color: red;">介绍：输入地点然后点击“地图查找”搜索，<br />
                                                    再点击地图地点获取相应经纬度</h3>
                                                输入地点

				                         <input id="where" runat="server" name="where" type="text" placeholder="请输入地址" /><input id="but" type="button" value="地图查找" onclick="sear(document.getElementById('where').value);" />

                                                <br />
                                                <br />
                                                地址：<asp:TextBox ID="txtAddress" runat="server" HintTitle="地址" HintInfo="请填写地址"></asp:TextBox>

                                                <br />
                                                <br />
                                                经度：<input id="lonlat" runat="server" />
                                                <br />
                                                <br />
                                                纬度：<input id="lonlat2" runat="server" />
                                            </div>
                                               </div>--%>
                                    </div>

                                    <%--<div class="col-sm-12" style="margin-top: 1em">
                                                <label class="col-sm-12 cintrol-label ">是否为店长</label>
                                                <asp:CheckBox ID="CheckBox1" name="checkbox" runat="server" onclick="showStore()" />
                                                <div id="store" style="display: none;">
                                                    <label class="col-sm-12 cintrol-label">店长可管理店铺</label>
                                                    <asp:Literal ID="ltMasterSetting" runat="server"></asp:Literal>
                                                </div>
                                            </div>--%>

                                    <div class="form-group">
                                        <div class="col-sm-8 col-sm-offset-3">
                                            <asp:Button ID="Button1" runat="server" Text="确定" class="btn btn-primary" OnClick="Button1_Click" />
                                        </div>
                                    </div>

                                </div>
                            </div>
                        </div>
                    </div>

                    <%-- <div id="tab22" class="tab-pane">
                            <div class="panel-body">
                                <div class="ibox-content">
                                    <div class="panel-body">
                                        <div class="form-group">

                                            <div class="col-sm-12" style="margin-top: 1em;">
                                                <label class="col-sm-2 control-label">可预约天数范围：</label>
                                                <div class="col-sm-1">
                                                    <asp:TextBox ID="txtDay" runat="server" class="form-control myday" MaxLength="10" HintTitle="可预约天数范围" HintInfo="可预约天数范围。"></asp:TextBox>
                                                </div>
                                            </div>


                                            <div class="col-sm-12" style="margin-top: 1em;">
                                                <label class="col-sm-2 control-label">预约时间段：</label>
                                                <div class="col-sm-10">
                                                    <span class="pull-left">选中可预约：</span>

                                                    <div class="timebox">
                                                        <div class="weekset">
                                                            <input type="checkbox" name="week" class="i-checks" id="week1" value="1" runat="server" />
                                                            <label class="checkbox-inline" for="week1">周一</label>
                                                            <input type="checkbox" name="week" class="i-checks" id="week2" value="2" runat="server" />
                                                            <label class="checkbox-inline" for="week2">周二</label>
                                                            <input type="checkbox" name="week" class="i-checks" id="week3" value="3" runat="server" />
                                                            <label class="checkbox-inline" for="week3">周三</label>
                                                            <input type="checkbox" name="week" class="i-checks" id="week4" value="4" runat="server" />
                                                            <label class="checkbox-inline" for="week4">周四</label>
                                                            <input type="checkbox" name="week" class="i-checks" id="week5" value="5" runat="server" />
                                                            <label class="checkbox-inline" for="week5">周五</label>
                                                            <input type="checkbox" name="week" class="i-checks" id="week6" value="6" runat="server" />
                                                            <label class="checkbox-inline" for="week6">周六</label>
                                                            <input type="checkbox" name="week" class="i-checks" id="week0" value="0" runat="server" />
                                                            <label class="checkbox-inline" for="week0">周日</label>
                                                        </div>

                                                        <ul class="list-unstyled timelist clockpicker">
                                                            <asp:Repeater ID="week" runat="server">
                                                                <ItemTemplate>
                                                                    <li class="input-group" style="margin: 10px 0">
                                                                        <span class="input-group-addon">时段</span>
                                                                        <input type="text" placeholder="0:00" class="form-control starttime" value="<%#Eval("start")%>" style="background-color: #fff;" readonly="" onclick="settime(this)" />
                                                                        <span class="input-group-addon">-</span>
                                                                        <input type="text" placeholder="1:00" class="form-control endtime" value="<%#Eval("end")%>" style="background-color: #fff;" readonly="" onclick="settime(this)" />
                                                                        <span class="input-group-addon">标题</span>
                                                                        <input type="text" placeholder="时间段标题" class="form-control item" value="" />
                                                                        <span class="input-group-addon">可预约</span>
                                                                        <input type="number" placeholder="2" class="form-control number" value="<%#Eval("number")%>" />
                                                                        <span class="input-group-addon">人</span>
                                                                        <span class="input-group-btn">
                                                                            <button class="btn btn-danger remove" type="button" onclick="remove(this)">删除</button></span>

                                                                    </li>
                                                                </ItemTemplate>
                                                            </asp:Repeater>
                                                        </ul>
                                                        <a class="btn btn-success btn-add" onclick="addtime()"><i class="fa fa-plus"></i>添加时间段</a>
                                                    </div>
                                                </div>
                                            </div>
                                            <asp:TextBox ID="timeVue" runat="server" Style="display: none"></asp:TextBox>

                                           <%-- <div id="remove">
                                                <div class="col-sm-12" style="margin-top: 1em;">
                                                    <label class="col-sm-2 control-label">排除的日期：</label>
                                                    <div class="col-sm-10">

                                                        <div class="col-sm-3">
                                                            <input type="text" readonly="readonly" runat="server" onclick="showtime(this, 1);" id="datetime1" class="datetimepicker dayu form-control" name="remove[]">
                                                        </div>
                                                        <div class="col-sm-9"><a href="javascript:;" onclick="delhouritem(this);"><i class="fa fa-times-circle" title="删除日期"></i></a></div>
                                                    </div>
                                                </div>


                                                <div class="col-sm-12" style="margin-top: 1em;">
                                                    <label class="col-sm-2 control-label">排除的日期：</label>
                                                    <div class="col-sm-10">

                                                        <div class="col-sm-3">
                                                            <input type="text" readonly="readonly" runat="server" onclick="showtime(this, 2);" id="datetime2" class="datetimepicker dayu form-control" name="remove[]">
                                                        </div>
                                                        <div class="col-sm-9"><a href="javascript:;" onclick="delhouritem(this);"><i class="fa fa-times-circle" title="删除日期"></i></a></div>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="col-sm-12" style="margin-top: 1em;">
                                                <label class="col-sm-2 control-label"></label>
                                                <div class="col-sm-10">
                                                    <a href="javascript:;" id="remove-add" class="btn btn-success"><i class="fa fa-plus-circle"></i>添加排除的日期</a>
                                                    <div class="help-block">排除的日期前台不可预约，用于节假日休息使用</div>
                                                </div>
                                            </div>--%>

                    <%--<div class="col-sm-12" style="margin-top: 1em;">
                                                <label class="col-sm-2 control-label">排除时间段：</label>
                                                <div class="col-sm-6">
                                                    <div class="input-group">
                                                        <span class="input-group-addon">周一</span>

                                                        <asp:TextBox ID="out1" runat="server" type="text" class="form-control" HintTitle="排除" HintInfo="12:30-13:30,18:30-20:30"></asp:TextBox>
                                                    </div>

                                                </div>
                                            </div>
                                            <div class="col-sm-12" style="margin-top: 1em;">
                                                <label class="col-sm-2 control-label"></label>
                                                <div class="col-sm-6">
                                                    <div class="input-group">
                                                        <span class="input-group-addon">周二</span>
                                                        <asp:TextBox ID="out2" runat="server" type="text" class="form-control" HintTitle="排除" HintInfo="12:30-13:30,18:30-20:30"></asp:TextBox>
                                                    </div>

                                                </div>
                                            </div>
                                            <div class="col-sm-12" style="margin-top: 1em;">
                                                <label class="col-sm-2 control-label"></label>
                                                <div class="col-sm-6">
                                                    <div class="input-group">
                                                        <span class="input-group-addon">周三</span>
                                                        <asp:TextBox ID="out3" runat="server" type="text" class="form-control" HintTitle="排除" HintInfo="12:30-13:30,18:30-20:30"></asp:TextBox>
                                                    </div>

                                                </div>
                                            </div>
                                            <div class="col-sm-12" style="margin-top: 1em;">
                                                <label class="col-sm-2 control-label"></label>
                                                <div class="col-sm-6">
                                                    <div class="input-group">
                                                        <span class="input-group-addon">周四</span>
                                                        <asp:TextBox ID="out4" runat="server" type="text" class="form-control" HintTitle="排除" HintInfo="12:30-13:30,18:30-20:30"></asp:TextBox>
                                                    </div>

                                                </div>
                                            </div>
                                            <div class="col-sm-12" style="margin-top: 1em;">
                                                <label class="col-sm-2 control-label"></label>
                                                <div class="col-sm-6">
                                                    <div class="input-group">
                                                        <span class="input-group-addon">周五</span>
                                                        <asp:TextBox ID="out5" runat="server" type="text" class="form-control" HintTitle="排除" HintInfo="12:30-13:30,18:30-20:30"></asp:TextBox>
                                                    </div>

                                                </div>
                                            </div>
                                            <div class="col-sm-12" style="margin-top: 1em;">
                                                <label class="col-sm-2 control-label"></label>
                                                <div class="col-sm-6">
                                                    <div class="input-group">
                                                        <span class="input-group-addon">周六</span>
                                                        <asp:TextBox ID="out6" runat="server" type="text" class="form-control" HintTitle="排除" HintInfo="12:30-13:30,18:30-20:30"></asp:TextBox>
                                                    </div>

                                                </div>
                                            </div>
                                            <div class="col-sm-12" style="margin-top: 1em;">
                                                <label class="col-sm-2 control-label"></label>
                                                <div class="col-sm-6">
                                                    <div class="input-group">
                                                        <span class="input-group-addon">周日</span>
                                                        <asp:TextBox ID="out7" runat="server" type="text" class="form-control" HintTitle="排除" HintInfo="12:30-13:30,18:30-20:30"></asp:TextBox>
                                                    </div>

                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>--%>
                </div>
            </div>
        </div>
        </div>
    </form>


    <!--全局JS-->
    <script src="../js/jQuery.min.js?v=2.1.4"></script>
    <script src="../js/bootstrap.min.js?v=3.3.6"></script>

    <!--自定义js-->
    <script src="../50/function.js"></script>
    <script src="../js/layer/layer.js" type="text/javascript"></script>
    <script src="../Js/clockpicker/bootstrap-clockpicker.min.js"></script>

    <%--添加预约时间--%>
    <script>
        //时间
        function settime(a) {
            $(a).clockpicker({ autoclose: true });

        }

        function setValue() {
            var value = { times: [] };
            $(".timelist").find('li').each(function () {
                var row = {};
                row.start = $(this).find('.starttime').val();
                row.end = $(this).find('.endtime').val();
                row.item = $(this).find('.item').val();
                row.number = $(this).find('.number').val();
                if (row.start && row.end && row.number) {
                    value.times.push(row);
                }
            });

            $("#timeVue").val(JSON.stringify(value.times));
            //alert(JSON.stringify(value.times));
        }

        function addtime() {

            var row = $('<li class="input-group" style="margin:10px 0">' +
                '<span class="input-group-addon">时段</span>' +
                '<input type="text" placeholder="0:00" class="form-control starttime" value="0:00"  style="background-color:#fff;" readonly onclick="settime(this)"/>' +
                '<span class="input-group-addon">-</span>' +
                '<input type="text" placeholder="1:00" class="form-control endtime" value="1:00"  style="background-color:#fff;" readonly onclick="settime(this)"/>' +
                '<span class="input-group-addon">标题</span>' +
                '<input type="text" placeholder="时间段标题" class="form-control item" value=""/>' +
                '<span class="input-group-addon">可预约</span>' +
                '<input type="number" placeholder="1" class="form-control number" value="1"/>' +
                '<span class="input-group-addon">人</span>' +
                '<span class="input-group-btn">' +
                '<button class="btn btn-danger remove" type="button" onclick="remove(this)">删除</button>' +
                '</span>' +
                '</li>');
            $(".timelist").append(row);

        }

        function remove(element) {
            if (confirm('确定删除该时段?')) {
                $(element).parent().parent().remove();
            }
        }

        $('#remove-add').click(function () {
            var index = $('.dayu').length;

            var rhtml = '<div class="col-sm-12" style="margin-top: 1em;">' +
                '<label class="col-sm-2 control-label">排除的日期：</label>' +
                '<div class="col-sm-10"  id="remove">' +
                ' <div class="col-sm-3"><input type="text" readonly="readonly" onclick="showtime(this,' + index + ');" id="datetime' + index + '" class="datetimepicker dayu form-control" name="remove[]" />' +
                '</div>' +
                '<div class="col-sm-9" style="padding-top:6px">' +
                '<a href="javascript:;" onclick="delhouritem(this);"><i class="fa fa-times-circle" title="删除日期"> </i></a>  </div>' +
                '</div>';
            $('#remove').append(rhtml);
        });
    </script>

    <script type="text/javascript" src="http://api.map.baidu.com/api?v=1.2"></script>
    <script type="text/javascript" charset="utf-8" src="http://map.qq.com/api/js?v=2.exp&key=OB4BZ-D4W3U-B7VVO-4PJWW-6TKDJ-WPB77&libraries=convertor"></script>
    <script type="text/javascript">

        var map = new BMap.Map("container");
        map.setDefaultCursor("crosshair");

        map.enableScrollWheelZoom();
        var point = new BMap.Point(102.82852, 24.88601);
        map.centerAndZoom(point, 13);
        var gc = new BMap.Geocoder();

        map.addControl(new BMap.NavigationControl());
        map.addControl(new BMap.OverviewMapControl());
        map.addControl(new BMap.ScaleControl());
        map.addControl(new BMap.MapTypeControl());
        map.addControl(new BMap.CopyrightControl());

        var marker = new BMap.Marker(point);
        map.addOverlay(marker);

        marker.addEventListener("click", function (e) {
            //转换百度坐标为腾讯坐标LatLng(纬度,经度)
            qq.maps.convertor.translate(new qq.maps.LatLng(e.point.lat, e.point.lng), 3, function (res) {
                latlng = res[0];
                console.log(latlng);
                document.getElementById("lonlat").value = latlng.lat;
                document.getElementById("lonlat2").value = latlng.lng;
            });
            gc.getLocation(e.point, function (rs) {
                //console.log(rs.address); //地址描述(string)
                //console.log(rs.addressComponents);//结构化的地址描述(object)
                //console.log(rs.addressComponents.province); //省
                //console.log(rs.addressComponents.city); //城市
                //console.log(rs.addressComponents.district); //区县
                //console.log(rs.addressComponents.street); //街道
                //console.log(rs.addressComponents.streetNumber); //门牌号
                //console.log(rs.surroundingPois); //附近的POI点(array)
                //console.log(rs.surroundingPois[0].address); //附近的POI点(array)
                //console.log(rs.business); //商圈字段，代表此点所属的商圈(string)
                document.getElementById("txtAddress").value = rs.surroundingPois[0].address;
            });
        });


        marker.enableDragging();

        marker.addEventListener("dragend", function (e) {
            gc.getLocation(e.point, function (rs) {
                showLocationInfo(e.point, rs);
            });
        });


        function showLocationInfo(pt, rs) {
            var opts = { width: 250, height: 150, title: "当前位置" };
            var addComp = rs.addressComponents;
            var addr = "当前位置：" + addComp.province + ", " + addComp.city + ", " + addComp.district + ", " + addComp.street + ", " + addComp.streetNumber + "<br/>";
            addr += "纬度: " + pt.lat + ", " + "经度：" + pt.lng;
            var infoWindow = new BMap.InfoWindow(addr, opts);
            marker.openInfoWindow(infoWindow);
        }

        map.addEventListener("click", function (e) {
            qq.maps.convertor.translate(new qq.maps.LatLng(e.point.lat, e.point.lng), 3, function (res) {
                latlng = res[0];
                console.log(latlng);
                document.getElementById("lonlat").value = latlng.lat;
                document.getElementById("lonlat2").value = latlng.lng;
            });
            gc.getLocation(e.point, function (rs) {
                //console.log(rs.address); //地址描述(string)
                //console.log(rs.addressComponents);//结构化的地址描述(object)
                //console.log(rs.addressComponents.province); //省
                //console.log(rs.addressComponents.city); //城市
                //console.log(rs.addressComponents.district); //区县
                //console.log(rs.addressComponents.street); //街道
                //console.log(rs.addressComponents.streetNumber); //门牌号
                //console.log(rs.surroundingPois); //附近的POI点(array)
                //console.log(rs.surroundingPois[0].address); //附近的POI点(array)
                //console.log(rs.business); //商圈字段，代表此点所属的商圈(string)
                document.getElementById("txtAddress").value = rs.surroundingPois[0].address;
            });
        });


        var traffic = new BMap.TrafficLayer();
        map.addTileLayer(traffic);


        function iploac(result) {
            var cityName = result.name;
        }

        var myCity = new BMap.LocalCity();
        myCity.get(iploac);

        function sear(result) {
            var local = new BMap.LocalSearch(map, { renderOptions: { map: map } });
            local.search(result);
        }

    </script>

    <%--信息提交--%>
    <script type="text/javascript">
        var success;
        if (success == "1") {

            swal({ title: "已有相同姓名或号码！", type: "success", shoeConfirmButton: false, timer: 2000 },
                function () {
                    var index = parent.layer.getFrameIndex(window.name);//获取当前窗体索引
                    layer.close(index);//执行关闭
                }
            );
        }
        if (success == "2") {

            swal({ title: "成功", type: "success", shoeConfirmButton: false, timer: 2000 },
                function () {
                    var index = parent.layer.getFrameIndex(window.name);//获取当前窗体索引
                    parent.layer.close(index);//执行关闭
                }
            );
        }
        if (success == "3") {

            swal({ title: "请输入正确的手机号码", type: "success", shoeConfirmButton: false, timer: 2000 },
                function () {
                    //location.reload();
                    var index = parent.layer.getFrameIndex(window.name);//获取当前窗体索引
                    layer.close(index);//执行关闭
                }
            );
        }
        function myclose() {
            var index = parent.layer.getFrameIndex(window.name);//获取当前索引
            parent.layer.close(index);//执行关闭

        }

        function showStore() {
            if ($('#CheckBox1').is(':checked')) {
                $('#store').show()
            }
            else {
                $('#store').hide()
            }
        }
    </script>
</body>
</html>
